<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
        >
<h:head>
    <title>Title</title>
</h:head>
<h:body>
    <ui:fragment rendered="#{identity.loggedIn}">
        <h:form>

            <p:commandLink action="#{identity.logout}" ajax="false" title="Cerrar sesión...">
                <h:outputText value="Cerrar sesión #{identity.account.loginName}..."/>
            </p:commandLink>

            <ui:fragment
                    rendered="#{authorizationChecker.hasApplicationRole('admin') or authorizationChecker.hasApplicationRole('adminLectura')}">
                <h:outputText value="(administrador)"/>
            </ui:fragment>

            <ui:fragment rendered="#{authorizationChecker.hasApplicationRole('tecnico')}">
                <h:outputText value="(técnico)"/>
            </ui:fragment>

            <ui:fragment rendered="#{authorizationChecker.hasApplicationRole('consola')}">
                <h:outputText value="(consola)"/>
            </ui:fragment>

            <ui:fragment rendered="#{authorizationChecker.hasApplicationRole('cliente')}">
                <h:outputText value="(cliente)"/>
            </ui:fragment>

            <ui:fragment rendered="#{authorizationChecker.hasApplicationRole('lectura')}">
                <h:outputText value="(lectura)"/>
            </ui:fragment>

            <!--
                        <ui:fragment rendered="#{authorizationChecker.isMember('clientes')}">
                            <div>You are a member of the 'clientes' group.</div>
                        </ui:fragment>
            -->

        </h:form>
    </ui:fragment>
</h:body>
</html>
